package cn.woochen.mvvmframe.config

import cn.woochen.mvvmframe.bean.ArticleBean
import cn.woochen.mvvmframe.bean.HomeBannerBean
import cn.woochen.mvvmframe.bean.Repo
import cn.woochen.mvvmframe.config.status.BaseBean
import retrofit2.http.*

interface ApiService {
    @GET("users/{user}/repos")
    suspend fun listRepos(@Path("user")  user:String): List<Repo>

    /**
     * 首页Banner
     */
    @GET("banner/json")
    suspend fun homeBanner(): BaseBean<List<HomeBannerBean>>

    /**
     * 文章列表
     */
    @GET("article/list/{page}/json")
    suspend fun articleList(@Path("page")  page:Int,@Query("page_size") pageSize:Int): BaseBean<ArticleBean>

}